Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Reworked documentation of Soroban RPC methods using open-rpc-docs-react component to be consistent with Anchor API #603

Merged
merged 5 commits into from
Oct 18, 2023

Conversation

MazurakIhor
Copy link
Contributor

No description provided.

…ct component to be consistent with Anchor API
@stellar-jenkins
Copy link

@ElliotFriend
Copy link
Contributor

Hi, @MazurakIhor Thanks SO much for putting this PR together! I've been really interested in getting our RPC spec into OpenRPC format recently, working to get the spec generated from the source code itself.

This PR is a really good step toward integrating the OpenRPC document(s) into our docusaurus site! We've had some other PRs merged in lately that have presented some conflicts on your branch. Could you resolve those for me, and push you changes back to your main branch?

# Conflicts:
#	api/methods/getEvents.mdx
#	package-lock.json
#	src/dev-server-plugin.js
#	yarn.lock
@stellar-jenkins
Copy link

@MazurakIhor
Copy link
Contributor Author

Hi, @ElliotFriend.
I merged latest main, resolved merge conflicts and updated descriptions in OpenRPC spec.

Copy link
Contributor

@ElliotFriend ElliotFriend left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates! Here are some thoughts/questions that came to mind as I was looking through the changes


const CodeBlock = require('@theme/CodeBlock').default;

export const RpcMethod = ({ method }) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TypeScript is giving me an error about method being implicitly any type. Can you add the string here, since we're in a TS component?

"schema": {
"type": "object",
"properties": {
"entries": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the return object has been updated again (sorry for more conflicts to fix lol). The newest changes are from this commit: 7506f2b

src/components/RpcMethod.tsx Show resolved Hide resolved
@stellar-jenkins
Copy link

@MazurakIhor
Copy link
Contributor Author

@ElliotFriend
I merged latest main and resolved merge conflicts.
Updated OpenRPC spec for getLedgerEntries RPC call.
Fixed TypeScript error.

Regarding styles: will try to adjust styles mentioned in your last comment, however in such case Soroban docs will differ from Stellar docs which were released recently.
Just an example:https://developers.stellar.org/api/anchor-platform/rpc/methods/do_stellar_payment/

@ElliotFriend
Copy link
Contributor

Regarding styles: will try to adjust styles mentioned in your last comment, however in such case Soroban docs will differ from Stellar docs which were released recently.

I'm a dummy! I didn't know that the Stellar docs had incorporated this. No worries about the styles then. I think it's likely better to leave it as is.

Thanks!

@ElliotFriend ElliotFriend self-requested a review October 18, 2023 19:47
Copy link
Contributor

@ElliotFriend ElliotFriend left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for the updates @MazurakIhor

This is a great step toward automating the spec even more!

@ElliotFriend ElliotFriend merged commit b945315 into stellar-deprecated:main Oct 18, 2023
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants